package com.smzd.framework.oauth2.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.smzd.core.dao.AbstractDao;
import com.smzd.core.mappers.IMapper;
import com.smzd.framework.oauth2.domain.Resource;
import com.smzd.framework.oauth2.mappers.ResourceMapper;

@Component
public class ResourceDao extends AbstractDao<Resource> {
    @Autowired
    private ResourceMapper mapper;

    @Override
    protected IMapper<Resource> getMapper() {
        return mapper;
    }

    public List<Resource> getResourcesByClientAppId(int clientAppId) {
        return mapper.getResourcesByClientAppId(clientAppId);
    }
}
